import 'package:bxultimate/data/request/organization_request.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'package:tdesign_flutter/tdesign_flutter.dart';

import 'state.dart';

class OrganizationTransferAdminController extends GetxController {
  final OrganizationTransferAdminState state = OrganizationTransferAdminState();



  String currentCheckIdcard = '';

  final orgId = Get.arguments['orgId'];

  @override
  void onInit() {
    // TODO: implement onInit
    super.onInit();

    getData();
  }

  void getData() async {
    state.userList =
    await OrganizationRequest.getCommonMemberList(orgId);
  }

  void handleSelect() async{

    await OrganizationRequest.transferMemberRole(orgId,currentCheckIdcard);

    SmartDialog.showNotify(msg: '转让成功', notifyType: NotifyType.success);

    Get.back();
  }
}
